SWEP.Manufacturer		= "Heckler & Koch"
SWEP.Cartridge			= "7.62x51mm NATO"

if ( CLIENT ) then
	SWEP.Author				= "CSE2 - Night-Eagle"
	SWEP.Contact			= "gmail sedhdi"
	SWEP.Purpose			= ""
	SWEP.Instructions		= ""
	SWEP.PrintName			= "G3 SG/1"
	SWEP.Instructions		= "Hold use and right-click to change firemodes."
	SWEP.Slot				= 2
	SWEP.SlotPos			= 0
	SWEP.IconLetter			= "i"
	
	killicon.AddFont("cse2_g3sg1","CSKillIcons",SWEP.IconLetter,Color(255,80,0,255))
end

if ( SERVER ) then
	AddCSLuaFile("shared.lua")
end


SWEP.Base				= "cse2_base"

SWEP.Spawnable			= true
SWEP.AdminSpawnable		= true

SWEP.ViewModel			= "models/weapons/v_snip_g3sg1.mdl"
SWEP.WorldModel			= "models/weapons/w_snip_g3sg1.mdl"
SWEP.HoldType = "smg"

SWEP.Weight				= 5

SWEP.Primary.Sound			= Sound("Weapon_G3SG1.Single")
SWEP.Primary.Recoil			= 2.5
SWEP.Primary.Unrecoil		= 6.5
SWEP.Primary.Damage			= 25
SWEP.Primary.NumShots		= 1
SWEP.Primary.Cone			= 0
SWEP.Primary.ClipSize		= 20
SWEP.Primary.DefaultClip	= 40
SWEP.Primary.Ammo			= "smg1"

//Firemode configuration

SWEP.ViewModelFlip = true

SWEP.firemode = "auto"

SWEP.Data = {
	semi = {
		Delay = .1,
		Cone = .006,
		ConeZoom = .001,
	},
	auto = {
		Delay = .1,
		Cone = .01,
		ConeZoom = .005,
	},
	zoom = {
		[2] = {
			fov = 45,
		},
		[3] = {
			fov = 11.25,
		},
	},
}

//End of configuration

SWEP.Secondary.ClipSize		= -1
SWEP.Secondary.DefaultClip	= -1
SWEP.Secondary.Automatic	= false
SWEP.Secondary.Ammo			= "none"

function SWEP:PrimaryAttack()
	if self.BaseClass.PrimaryAttack(self) then
		self.Owner:TakeDamage(math.random(0,25),self)
	end
end
